﻿@model IEnumerable<SIFIET.Models.Survey>

@{
    ViewBag.Title = "Encuestas";
}

<div class="grid">
    <div class="c12 first">
        <h2>Encuesta</h2>
        
        <div class="alert success">@TempData["Sucess"]</div>
            <div class="alert success">@TempData["Update"]</div>
            <div class="alert success">@TempData["Remove"]</div>
            <br/>
            <p>
                @Html.ActionLink("Crear Nueva Encuesta", "Create", null, htmlAttributes: new { @class = "ebutton blue" })
            </p>
    </div>
    <div class="c12">
        <div class="c9 first">
            <table>
                <tr>
                    <th>
                        Nombre
                    </th>
                    <th>
                        Objetivo
                    </th>
                    <th>Acciones</th>
                </tr>
                @{ int i = 0;}
                @foreach (var item in Model)
                {
                    if (i % 2 == 0)
                    {
        
                        @:<tr>
                    }
                    else
                    {
                        @:<tr class="even">
                    }
                    <td>
                        @Html.DisplayFor(modelItem => item.Name)
                    </td>
                    <td>
                        @Html.DisplayFor(modelItem => item.Aim)
                    </td>
                    <td>

                    <div class="c12">

                        <div class="c1 first">
                          
                            @Html.ActionLink(" ", "Edit", new { id = item.Id}, htmlAttributes: new { @class = "btnedit", @title = "Editar" }) 
                            
                        </div>
                        <div class="c1">
                            @Html.ActionLink(" ", "Delete", new { id = item.Id}, htmlAttributes: new { @class = "btndelete", @title = "Eliminar" })
                        </div>

                        <div class="c1 first">
                                                  
                        </div>
                    
                        <div class="c1">
                            <div class="boton">
                                &#9660;                                       
                                @*<img src="@Url.Content("~/Content/themes/base/images/more.png")"/>*@
                                <div class="informa">
                                    <div class="contenido">
                                        <div class="arrow_box"></div>
                                        <div class="titulo">Más opciones</div>
                                        <ul>
                                            <li class="lmenu">@Html.ActionLink("Agregar temas", "Index", "SurveysTopics", new { id = item.Id }, null) </li>
                                            <li class="lmenu">@Html.ActionLink("Enviar Encuesta General", "Send", "SendSurveys", new { id = item.Id }, null) </li>
                                            <li class="lmenu"> @Html.ActionLink("Enviar Encuesta Especifica", "SendSpecific", "SendSurveys", new { id = item.Id }, null) </li>
                                            <li class="lmenu"> @Html.ActionLink("Crear informe preeliminar", "CreateReport", "Surveys", new { id = item.Id }, null) </li>

                                        </ul>	
                                    </div>
                                </div>
                            </div>
                        </div>

                    </div>
                    
                    
                    
                    </td>
                    @:</tr>
                    i++;
                }

            </table>
        <br />
                
        </div>
        <div class="c3 last"> @Html.Partial("_LayoutSideBar")</div>
    </div>
    
    &nbsp;
</div>
   
<script src="@Url.Content("~/Scripts/jquery-1.7.1.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/menu.js")" type="text/javascript"></script>
